package cn.exrick.xboot.modules.Information.dao.mapper;

import cn.exrick.xboot.common.vo.SearchVo;
import cn.exrick.xboot.modules.Information.entity.*;
import cn.exrick.xboot.modules.base.entity.Department;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Param;
import org.springframework.security.core.parameters.P;

import java.util.List;
import java.util.Map;

/**
 * 河流信息数据处理层
 * @author Lyg
 */
public interface RiverMapper extends BaseMapper<River> {

    /**
     * 查找正在巡河的人
     * @Param("userDSdasda") String userId
     * @return
     */
    List<RiverTourHistory> findRiverPeople(Map<String, Object> map);

    List<WorkCondition> getWorkConditionForm(Map<String, Object> map);

    List<RiverPatrol> getRiverPatrolForm(Map<String, Object> map);

    List getUserId(Map<String, Object> map);

    List<RiverTourNum> getListId(Map<String, Object> map);
    List<RiverTourNum> getZhenListId(Map<String, Object> map);
    String getZhen(Map<String, Object> map);

    String getXunHe(@Param("map")Map<String, Object> map,@Param("id") String id);

    String getKm(@Param("map")Map<String, Object> map,@Param("id") String id);
    String getKmI(@Param("map")Map<String, Object> map,@Param("id") String id);

    String getIssueNum(@Param("map") Map<String, Object> map,@Param("id") String id);

    List<RiverTourNum> getNoId(Map<String, Object> map);
    List<RiverTourNum> getZhenListNoId(Map<String, Object> map);

    String getFinish(@Param("map") Map<String, Object> map,@Param("id") String id);
    String getYourself(@Param("map") Map<String, Object> map,@Param("id") String id);

    String getDetails(@Param("format")String format,@Param("id")String id);

    /**
     * 按部门id查询本部门及其下级id
     * @param deptId
     * @return 部门字符串以","分割
     */
    String getDeptChilds(@Param("deptId") String deptId);

    /**
     * 按条件查询已经登陆巡河人员
     * @param map
     * @return
     */
    List<RiverTourNum> getRiverTourNumByDept(Map<String, Object> map);
    /**
     * 按条件查询未经登陆巡河人员
     * @param map
     * @return
     */
    List<RiverTourNum> getNotRiverTourNumByDept(Map<String, Object> map);

    //查询各镇巡管员运行情况表
    List<RiverPersonTable> getRiverPatrolTable(Map<String, Object> map);

    //查询各镇巡管员数量等
    RiverPersonTable getRiver(@Param("map") Map<String, Object> map,@Param("id") String id);

    String getNotLog(@Param("map") Map<String, Object> map,@Param("name") String name);
    String getPn(@Param("map") Map<String, Object> map,@Param("id") String id);
    String getPv(@Param("map") Map<String, Object> map,@Param("id") String id);
    String getDistances(@Param("map") Map<String, Object> map,@Param("id") String id);
    String getIIssueNum(@Param("map") Map<String, Object> map,@Param("id") String id);
    //查询各镇运行情况表
    List<TownRiverTable> getTownRiverTable(Map<String, Object> map);
    String getIssueNumOk(@Param("map") Map<String, Object> map,@Param("id") String id);
    String getThreeIssue(@Param("map") Map<String, Object> map,@Param("id") String id);
    String getThreeRateNum(@Param("map") Map<String, Object> map,@Param("id") String id);
    List<String> getUserIId(@Param("map") Map<String, Object> map,@Param("id") String id);
    Integer getNums(@Param("format")String format,@Param("id")String s);

    /**
     * 各段所运行情况表
     * @param searchVo
     * @return
     */
    List<ParagraghOperation> getParagraghOperation(SearchVo searchVo);
}